package com.whfc.ms.api.fim.controller;

import com.whfc.common.base.BaseController;
import com.whfc.common.result.Result;
import com.whfc.common.result.ResultUtil;
import com.whfc.common.util.SessionAttr;
import com.whfc.fuum.entity.SysUser;
import com.whfc.ms.api.fim.service.MsVcsHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.SessionAttribute;

/**
 * @ClasssName AppVcsHomeController
 * @Description 云智筑H5主页面
 * @Author hw
 * @Date 2020/8/14 9:27
 * @Version 1.0
 */
@RestController
@RequestMapping("/ms/api/fim")
public class AppVcsHomeController extends BaseController {

    @Autowired
    private MsVcsHomeService msVcsHomeService;

    @GetMapping(value = "/vcs/home")
    public Result home(@SessionAttribute(SessionAttr.MS_USER) SysUser user){
        logger.info("请求云智筑主页地址 loginer：{}", user.getUsername());
        return ResultUtil.success(msVcsHomeService.getHome());
    }

}
